import 'package:flutterstudyapplast/business/models/article_collect_item.dart';
import 'package:flutterstudyapplast/business/models/banner_item.dart';
///抽取接口，目的是依赖接口而不是实现
abstract class Api{
  Future<Map<String,dynamic>> getArticleList(int page);
  Future<List<BannerItem>> getBanner();
  Future<Map<String,dynamic>> getArticleCollects(int page);
  Future<List<ArticleCollctItem>> getWebsiteCollects();
  Future<Map<String,dynamic>> collectWebsite(String name,String url);
  Future<Map<String,dynamic>> unCollectWebsite(int id);
  Future<Map<String,dynamic>> collectArticle(int id);
  Future<Map<String,dynamic>> unCollectArticle(int id);
  Future<Map<String,dynamic>> login(String username, String password);
  Future<Map<String,dynamic>> register(String username, String password);

}